<?php
include("../sql/connexionmysql.php");
$Rubrique = (mysql_fetch_array(mysql_query('SELECT titre,title FROM rubrique WHERE id = 8')));
$RubriqueName = $Rubrique['titre'];
$RubriqueTitle = $Rubrique['title'];

$id = intval($_POST['idPhoto']);

$Photo = mysql_fetch_array(mysql_query('SELECT * FROM galerie WHERE idGalerie = '. $id));

$PreviousPhoto = mysql_fetch_array(mysql_query('SELECT idGalerie FROM galerie WHERE idGalerie < '. $id .' ORDER BY idGalerie DESC LIMIT 1'));

$NextPhoto = mysql_fetch_array(mysql_query('SELECT idGalerie FROM galerie WHERE idGalerie > '. $id .' ORDER BY idGalerie LIMIT 1'));

$maxid = mysql_fetch_array(mysql_query('SELECT MAX(idGalerie) AS Max FROM galerie'));
$minid = mysql_fetch_array(mysql_query('SELECT Min(idGalerie) AS Min FROM galerie'));

?>
	<div id="Bloc_PreviousPhoto"><?php echo $PreviousPhoto['idGalerie']?></div>
	<div id="Bloc_NextPhoto"><?php echo $NextPhoto['idGalerie']?></div>